<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue 使用animateCss库</title>
    <link rel="stylesheet" href="css/animate.css">
    <script charset="UTF-8" src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <!--自定义动画名称-->
    <!--enter-active-class,leave-active-class-->
    <transition
            enter-active-class="animated swing"
            leave-active-class="animated shake">
        <div v-if="show">
            hello World
        </div>
    </transition>
    <button @click="handleClick">切换</button>
</div>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            show: true
        },
        methods: {
            handleClick: function () {
                this.show = !this.show;
            }
        }
    });
</script>
</body>
</html>